package com.project.listener;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@ControllerAdvice
public class PressException {
    @ExceptionHandler(Exception.class)
    public String press(Exception e){
        return "抛出"+e.getClass().getName()+"异常";
    }
}
